CPPFLAGS=-Wall -Werror

all: main.o rational.o
	g++ $(CPPFLAGS) -o rational main.o rational.o

main.o: main.cpp
	g++ -c main.cpp $(CPPFLAGS) -o main.o
	
rational.o: Rational.h Rational.cpp
	g++ -c Rational.cpp $(CPPFLAGS) -o rational.o

clean:
	rm -rf *o rational

.PHONY: all clean 